#include "Log.hpp"
#include "ThreadPool.hpp"
#include "Task.hpp"
#include <memory>

using namespace LogModule;
using namespace ThreadPoolModule;

int main()
{
    Enable_Console_Log_Strategy();
    //ThreadPool<task_t>::GetInstance();

    //ThreadPool<task_t> *tp = new ThreadPool<task_t>();
    //tp->Start();
    int count = 10;
    while(count)
    {
        ThreadPool<task_t>::GetInstance()->Enqueue(Download);
        sleep(1);
        count--;
    }

    ThreadPool<task_t>::GetInstance()->Stop();
    ThreadPool<task_t>::GetInstance()->Join();
    //sleep(5);
    //tp->Equeue(t);

    //tp->Stop();
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<ConsoleLogStrategy>();//c++14
    //  std::unique_ptr<LogStrategy> strategy = std::make_unique<FileLogStrategy>();//c++14
    //  strategy->SyncLog("hello log");
    //logger.EnableFileLogStrategy();
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello log" << 4.13 << "  1";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello log";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello log";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello log";
    // Enable_Console_Log_Strategy();
    // LOG(LogLevel::DEBUG)<< "hello world" << 3.24;
    // LOG(LogLevel::DEBUG)<< "hello world" << 3.24;
    // LOG(LogLevel::DEBUG)<< "hello world" << 3.24;
    // LOG(LogLevel::DEBUG)<< "hello world" << 3.24;

    return 0;
}